package com.maven.qqspider;

import javax.swing.JFrame;
import javax.swing.SwingUtilities;

import org.apache.log4j.Logger;

import com.maven.qqspider.ui.ColorDefinitions;
import com.maven.qqspider.ui.LookAndFeelSelector;
import com.maven.qqspider.ui.StandardFrame;
import com.maven.qqspider.util.log4j.Log;


public class QQSpider {
	
	private static Logger logger = Log.getLogger();

	public static void main(String[] args){
		System.out.println("---------------QSpider---------------");
		launch();
	}
	
	public static void launch() {
		logger.info("Launching QSpider....");
		logger.info("java.version = " + System.getProperty("java.version"));
		
		try {
			/** Sets LookAndFeel */
			LookAndFeelSelector.setLookAndFeel("OfficeBlue2007");// Nimbus aTunes Blue  Metal Creme Sahara OfficeBlue2007 OfficeSilver2007
			ColorDefinitions.initColors();
			
			/** Launch the application */
			SwingUtilities.invokeAndWait(new Runnable() {
				@Override
				public void run() {
					StandardFrame frame = StandardFrame.getInstance();
					frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
					frame.setVisible(true);
//					AWTUtilities.setWindowOpacity(frame,  0.9f);
				}
			});
		} catch (Exception e) {
			logger.error(e.getMessage(), e);
		}
		
	}	
	
}
